Skip to content

Conversation

@mmatheson
Copy link
Member

Split env.rs test file on parser boundaries, import them all in the env.rs file.

@trunk-io
Copy link

trunk-io bot commented Jan 13, 2026

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.02%. Comparing base (920369c) to head (fb5ff53).

Additional details and impacted files
@@                    Coverage Diff                     @@
##           matt/circleci_env_parsing     #983   +/-   ##
==========================================================
  Coverage                      81.02%   81.02%           
==========================================================
  Files                             66       66           
  Lines                          14152    14152           
==========================================================
  Hits                           11466    11466           
  Misses                          2686     2686           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@dfrankland dfrankland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

much nicer

Image

Comment on lines 1 to 6
use context::env::{
self, EnvVars,
parser::{BranchClass, CIInfo, CIPlatform, EnvParser},
validator::{EnvValidationIssue, EnvValidationIssueSubOptimal, EnvValidationLevel},
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All imports here are unused

Comment on lines +7 to +22
#[path = "env/bitbucket.rs"]
mod bitbucket;
#[path = "env/buildkite.rs"]
mod buildkite;
#[path = "env/circleci.rs"]
mod circleci;
#[path = "env/custom.rs"]
mod custom;
#[path = "env/drone.rs"]
mod drone;
#[path = "env/github.rs"]
mod github;
#[path = "env/gitlab.rs"]
mod gitlab;
#[path = "env/semaphore.rs"]
mod semaphore;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO using path is sort of a anti-pattern (since it makes it harder to reason about module hierarchy. Instead of this, I'd just prefix each of these files with env_ and keep them at the top level.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok - still new to rust, I just found something that "worked" - ty

@trunk-staging-io
Copy link

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@trunk-io
Copy link

trunk-io bot commented Jan 14, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants